/*
 * Util.java
 *
 * This file contains Boeing intellectual property.  It may
 * contain information about Boeing processes that are part
 * of the Company's competitive advantage.  Release of this
 * file requires prior approval from Luxoft Management.
 *
 * Copyright (c) 2010, The Boeing Company All Rights Reserved
 */
package trss.bencode;

/**
 * @author IKhoroshev
 * @version 1.0
 */
public class Util {
    public static String getString(BElement bString) {
        if (bString != null && bString instanceof BString) {
            return new String(((BString) bString).getValue());
        }
        return null;
    }
    public static Long getLong(BElement bInteger) {
        if (bInteger != null && bInteger instanceof BInteger) {
            return new Long(((BInteger) bInteger).getValue());
        }
        return null;
    }
}
